# -*- coding: utf-8 -*-
# 全局变量
# @Time    : 2024/12/10 上午1:57
# @Author  : 赵鑫源
# @FileName: global_vars.py
# @Software: PyCharm

import faiss
from modelscope.utils.constant import Tasks
from modelscope.pipelines import pipeline

global_index = faiss.IndexFlatL2(512)
global_i2key = {}
index_to_ulid = {}

global_model = pipeline(
            task=Tasks.multi_modal_embedding,
            model='damo/multi-modal_clip-vit-base-patch16_zh',
            model_revision='v1.0.1')